import request from '../utils/request'

export function getAllUser() {
    return request.post(`/front/user/get_all_user`);
}

export function getAllRole() {
    return request.post('/front/user/get_all_role');
}

export function getAllPermission() {
    return request.post('/front/user/get_all_permission');
}

export function deleteUser(params) {
    return request.post('/front/user/delete_user', { params });
}

export function deleteRole(params) {
    return request.post('/front/user/delete_role', { params });
}

export function deletePermission(params) {
    return request.post('/front/user/delete_permission', { params });
}

export function editUserRole(params) {
    return request.post('/front/user/set_role', params);
}

export function editRolePermission(params) {
    return request.post('/front/user/edit_role_permission', params);
}

export function addNewRole(params) {
    return request.post('/front/user/add_role', params );
}

export function editPermission(params) {
    return request.post('/front/user/update_permission', params);
}

export function delistGoods(params) {
    return request.post('/front/book/delist_goods', params);
}
